<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>E-M-S</title>
<link rel="stylesheet" href="__PUBLIC__/css/index.css" type="text/css" media="screen" />
<link rel="stylesheet" href="__PUBLIC__/css/ui-lightness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen" />

<SCRIPT language=JavaScript src="__PUBLIC__/js/jquery-1.6.2.min.js"></SCRIPT> 
<SCRIPT language=JavaScript src="__PUBLIC__/js/jquery-ui-1.8.16.custom.min.js"></SCRIPT>


<script>
$(function() {
		$( "#datepicker" ).datepicker();
		$('#datepicker').datepicker('option', 'dateFormat', 'yy-mm-dd');
		
	
		$( "#add" ).draggable();
		$("#submit").button();
		$("#submit").click(function(){

		$.ajax({
		type:"POST", 
		url:"__APP__/index/add", 
		data:$("#ems_form").serialize(), 
		beforeSend:function(){$("#submit").val(".......") }, 
		success:function(msg) { $("#submit").val("Submit"); $("#table_info tbody").prepend(msg); } , 
		error:function(msg){ alert("sss")},
		dataType:"html"   } );


		});

		
	
	});
</script> 
</head>
<body>
<!--S 注释开始-->
<p class="m version">1.插入，显示数据列表  2.优化插入时ajax及时插入、反馈  3.删除、编辑数据  4.增加收入功能  5.页面加入统计模块（可排序）  6.列表项可以动态选择   7.加入用户系统   8.修复ajax error</p>

<div class="m header">
	E-M-S
	
</div>
<!--E 注释开始-->
<div class="m main  ">

<div class="add" id="add">
<form id="ems_form" method="post">
<p><span class="tit">Date:</span><input type="text" value="" id="datepicker" name="date" id="date"></p>
<p><span  class="tit">Category:</span><select name="cat" id="cat"><option value="吃饭">吃饭</option><option value="购物">购物</option><option value="交通">交通</option><option value="缴费">缴费</option><option value="借贷">借贷</option><option value="取现">取现</option><option value="人情">人情</option><option value="医药">医药</option><option value="游玩">游玩</option></select></p>
<p><span class="tit">Card:</span><select name="card" id="card"><option value="Z储蓄卡.建">Z储蓄卡.建</option><option value="Z储蓄卡.农">Z储蓄卡.农</option><option value="Z信用卡.建">Z信用卡.建</option><option value="J储蓄卡.招">J储蓄卡.招</option><option value="J信用卡.建">J信用卡.建</option><option value="J信用卡.招">J信用卡.招</option></select></p>
<p><span class="tit">Fee:</span><input type="text" value="" name="fee" id="fee" onfocus="this.value=''"></p>

<p><span class="tit">Detail:</span><input type="text" value="" name="detail" id="detail" onfocus="this.value=''"></p>
<p><span class="tit">Where:</span><input type="text" value="" name="where" id="where" onfocus="this.value=''"></p>
<p><span class="tit">Who:</span><select name="who" id="who"><option value="M">M</option><option value="Z">Z</option></select></p>
</form>
<p><span class="tit">&nbsp;&nbsp;</span><input type="button" value="Submit" id="submit"></p>

</div>


<div class="wrap_table" id="table-wrapper">
<table class="table_info" id="table_info">
<colgroup>
<col width="15%">
<col width="15%">
<col width="15%">
<col width="15%">
<col width="20%">
<col width="15%">
<col width="5%">
</colgroup>
<thead>
<tr>
<th>Date</th>
<th>Category</th>
<th>Card</th>
<th>Fee</th>
<th>Detail</th>	
<th>Where</th>
<th>Who</th>
</tr>
</thead>
<tbody>
<?php 
module('index')->show(100); 
?>
</tbody>
</table>

</div>

<br>
<br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
</div>
</body>
</html>
